package com.tdkj.model.user;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;

/**
 * XnkyAdminLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "xnky_admin_log")
public class BeanAdminLog extends BaseEntity{

	// Fields
	private String adminaction;
	private String ip;
	private Timestamp createtime;
	private BeanAdmin admin;

	// Constructors

	/** default constructor */
	public BeanAdminLog() {
	}

	/** minimal constructor */
	public BeanAdminLog(long id) {
		this.setId(id);
	}

	/** full constructor */
	public BeanAdminLog(long id,String adminaction, String ip, Timestamp createtime,BeanAdmin admin) {
		this.setId(id);
		this.adminaction = adminaction;
		this.ip=ip;
		this.createtime = createtime;
		this.admin=admin;
	}
	
	@Column(name = "adminaction", length = 40)
	public String getAdminaction() {
		return this.adminaction;
	}

	public void setAdminaction(String adminaction) {
		this.adminaction = adminaction;
	}

	@Column(name = "ip", length = 40)
	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	@Column(name = "createtime", nullable = false, length = 19)
	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "adminid", nullable = false)
	public BeanAdmin getAdmin() {
		return this.admin;
	}

	public void setAdmin(BeanAdmin admin) {
		this.admin = admin;
	}
	
}